# Maintainer: Felix Yan <felixonmars@archlinux.org>
# Contributor: csslayer <wengxt AT gmail com>

pkgname=xcb-imdkit
pkgver=1.0.5
pkgrel=1
pkgdesc="Input method development support for xcb"
arch=('loong64' 'x86_64')
url="https://github.com/fcitx/xcb-imdkit"
license=('GPL')
depends=('xcb-util' 'xcb-util-keysyms')
makedepends=('extra-cmake-modules' 'ninja' 'uthash' 'xorgproto')
source=("https://download.fcitx-im.org/fcitx5/xcb-imdkit/xcb-imdkit-$pkgver.tar.xz"{,.sig})
sha512sums=('b021015e819c1d1722e5a04050a6839c28c38912c571cbe7a90c7e9055c36b77c3d16ee0930c86d4b602f2f3a2ad7c087d80101ff20a67255c45c0433358dd31'
            'SKIP')
validpgpkeys=('2CC8A0609AD2A479C65B6D5C8E8B898CBF2412F9') # Weng Xuetian <wengxt@gmail.com>

build() {
  cd $pkgname-$pkgver

  cmake -GNinja -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_INSTALL_LIBDIR=/usr/lib .
  ninja
}

check() {
  cd $pkgname-$pkgver
  ninja test
}

package() {
  cd $pkgname-$pkgver
  DESTDIR="$pkgdir" ninja install
}
